import {getData,setData} from '@/utils/ls'
const TOKENKEY='rabbit-token'
const user={
  namespaced:true,
  state:()=>({
    token:getData(TOKENKEY) || ''
  }),
  mutations:{
    setToken(state,token){
      // 存入vuex
      state.token=token
      // 本地存一份
       setData(TOKENKEY,token)
    }
  }
}
export default user 